# Maintainer: Maxime Gauduin <alucryd@archlinux.org>

pkgname=python-ciso8601
pkgver=2.3.0
pkgrel=2
pkgdesc='Fast ISO8601 date time parser for Python written in C'
arch=(loong64 x86_64)
url=https://github.com/closeio/ciso8601
license=(MIT)
depends=(
  glibc
  python
)
makedepends=(
  cython
  git
  python-setuptools
)
_tag=eeea0e483f0d710d711b38cfc8dcd5935a20177d
source=(git+https://github.com/closeio/ciso8601.git#tag=${_tag})
sha256sums=(SKIP)

pkgver() {
  cd ciso8601

  git describe --tags | sed 's/^v//'
}

build() {
  cd ciso8601

  python setup.py build
}

package() {
  cd ciso8601

  python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
  install -Dm 644 LICENSE -t "${pkgdir}"/usr/share/licenses/python-ciso8601/
}

# vim: ts=2 sw=2 et:
